using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Nevron.GraphicsCore;
using Nevron.Chart;
using Nevron.Chart.WinForm;


namespace sun.console
{
    public partial class Chart : Form
    {
        public Chart()
        {
            InitializeComponent();
        }
        
        private void Chart_Load(object sender, EventArgs e)
        {
            NCartesianChart chart = (NCartesianChart)chartControl.Charts[0];
            // add bar series to it
            NBarSeries bar = (NBarSeries)chart.Series.Add(SeriesType.Bar);
            bar.WidthPercent = 10;
            bar.DepthPercent = 10;
            bar.BarWidth = new NLength(100, NRelativeUnit.ParentPercentage);
            bar.BarDepth = new NLength(30, NRelativeUnit.ParentPercentage);
            bar.BarShape = BarShape.Bar;
            bar.BarShape = BarShape.SmoothEdgeBar;
            bar.HasTopEdge = true;
            bar.HasBottomEdge = true;
            bar.BarEdgePercent = 0;
            bar.UseOrigin = true;
            bar.Origin = 15;
            NDataPoint point1 = new NDataPoint(0.0, 5.0);
            NDataPoint point2 = new NDataPoint(0.0, 25.0);
            NDataPoint point3 = new NDataPoint(0.0, 70.0);
            NDataPoint point4 = new NDataPoint(0.0, 10.0);

            bar.AddDataPoint(point1);
            bar.AddDataPoint(point2);
            bar.AddDataPoint(point3);
            bar.AddDataPoint(point4);
        }
    }
}